package com.stn.zjx.givingtreasure.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;

import com.orhanobut.logger.Logger;

import cn.bingoogolapple.bgabanner.BGABanner;

/**
 * Created by 朱俊鑫 on 2018
 * 自定义导航viewpager
 * @author 朱俊鑫
 * @since 2018-3
 */
public class DragPhotoViewpager extends BGABanner {

    public DragPhotoViewpager(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public DragPhotoViewpager(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        try {
            return super.onInterceptTouchEvent(ev);
        } catch (IllegalArgumentException e) {
            //这里就是我们想要处理的问题
            e.printStackTrace();
            Logger.e("TAG", "onInterceptTouchEvent: " );
            return false;
        }
    }
}
